package com.iwomy.secureplat.platform.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 报警记录表
 *
 * @author pig
 * @date 2023-11-21 15:08:54
 */
@Data
@TableName("alarm_logging")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "报警记录表")
public class AlarmLoggingEntity extends Model<AlarmLoggingEntity> {


	/**
	 * ID
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@Schema(description = "ID")
	private Long id;

	/**
	 * 设备ID
	 */
	@Schema(description = "设备ID")
	private Long deviceId;

	/**
	 * IMEI
	 */
	@Schema(description = "IMEI")
	@TableField(condition = SqlCondition.LIKE)
	private String imei;

	/**
	 * 设备类型
	 */
	@Schema(description = "设备类型")
	private Long deviceTypeId;
	/**
	 * 设备类型
	 */
	@Schema(description = "设备类型")
	private String deviceTypeName;

	/**
	 * 设备型号
	 */
	@Schema(description = "设备型号")
	private Long deviceModelId;

	/**
	 * 设备型号名称
	 */
	@Schema(description = "设备型号名称")
	private String deviceModelName;

	/**
	 * 单位id
	 */
	@Schema(description = "单位id")
	private Long deptId;

	/**
	 * 安装点位
	 */
	@Schema(description = "安装点位")
	private Long installLocationId;

	/**
	 * 工单类型（事件类型）
	 */
	@Schema(description = "工单类型（事件类型）")
	private Long eventTypeId;

	/**
	 * 工单类型（事件类型）
	 */
	@Schema(description = "工单类型（事件类型）")
	private String eventTypeName;

	/**
	 * 报警原因
	 */
	@Schema(description = "报警原因")
	private String alarmCauses;

	/**
	 * 报警确认类型  根据处理类型表展示
	 */
	@Schema(description = "报警确认类型  根据处理类型表展示")
	private Integer confirmState;

	/**
	 * 备注
	 */
	@Schema(description = "备注")
	private String remarks;

	/**
	 * 排序
	 */
	@Schema(description = "排序")
	private Integer sort;

	/**
	 * 状态 10 已处理  20 未处理
	 */
	@Schema(description = "状态 10 已处理  20 未处理")
	private Integer state;


	/**
	 * 创建时间
	 */
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "创建时间")
	private LocalDateTime createTime;

	/**
	 * 修改人
	 */
	@Schema(description = "修改人")
	private String updateBy;

	/**
	 * 修改时间
	 */
	@TableField(fill = FieldFill.INSERT_UPDATE)
	@Schema(description = "修改时间")
	private LocalDateTime updateTime;

	/**
	 * 是否被删除标记（0未删除；1已删除）
	 */
	@TableLogic
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "是否被删除标记（0未删除；1已删除）")
	private String delFlag;

	/**
	 * 租户ID
	 */
	@Schema(description = "租户ID")
	private Long tenantId;

	/**
	 * 短信报警ID
	 */
	@Schema(description = "短信报警ID")
	private Long smsAlarmId;

	/**
	 * 公众号报警ID
	 */
	@Schema(description = "公众号报警ID")
	private Long officialAccountAlarmId;

	/**
	 * 电话报警ID
	 */
	@Schema(description = "电话报警ID")
	private Long telephoneAlarmId;

	/**
	 * 短信报警简述
	 */
	@Schema(description = "短信报警简述")
	private String smsAlarmSketch;

	/**
	 * 公众号报警简述
	 */
	@Schema(description = "公众号报警简述")
	private String officialAccountAlarmSketch;

	/**
	 * 电话报警简述
	 */
	@Schema(description = "电话报警简述")
	private String telephoneAlarmSketch;

	/**
	 * 事件等级
	 */
	@Schema(description="事件等级")
	private Integer processTypeLevel;
	/**
	 * 处理类型名称
	 */
	@Schema(description="处理类型名称")
	private String processTypeName;

	/**
	 * 处理时间
	 */
	@Schema(description = "处理时间")
	private LocalDateTime processingTime;

	private String installLocationDetailAddress;
	private BigDecimal longitude;
	private BigDecimal latitude;
	private String name;
	private String phone;

	private String address;

}